#pragma once
#include <vsg/all.h>

namespace qbe::utils::TempRender {

//填充的样式参数
struct FillParm {
  float width;
  float space;
  float line_width;
  float dot;
  float angle;
  float only_side;
  float use_point_grid;
  float scale;
};

//边框的参数
struct BorderParm {
  // bool isDash;
  float dash;
  float gap;
};

struct LayerParam {
  vsg::vec4 fill_color;
  FillParm fill_parm;
  vsg::vec4 border_color;
  BorderParm border_parm;
};

void getLayerParam(std::vector<std::string> layer_info, LayerParam& layer_param);
BorderParm getLineType(std::string info);
class LayerType {
 public:
  LayerType();
  ~LayerType();

  void addLayerParam(int number, vsg::vec4 fill_color, FillParm fill_parm, vsg::vec4 border_color, BorderParm border_parm);

  bool findLayerParam(int number, LayerParam&);

 private:
  std::map<int, LayerParam> m_layer_params;
};
}  // namespace qbe::utils::TempRender
